.data:
  a:  
    .word 0x1
  b: 
    .word 0x2
  c:
    .word 0xA

.text:
  movi %r0, 5         // r0 = 5  #0
  movi %r1, 2         // r1 = 2, #1
  add2 %r0, %r1       //r0 = 7, #2
  add3 %r2, %r0, %r1  // r2 = 7+2 = 9, #3
  mov %r1, %r2        // r1 = 9, #4
  ldl %r3, a          // r3 = 1, #5
  ld  %r1, 0(%r3)     // r1 = 2, #6
  stl %r0, a          // store 7 at label a, #7
  st  %r3, 1(%r3)     // store 1 at label c (at address 1+1), #8
  sub3 %r3, %r0, %r2  // r3 = 7-9 = -2, #9
  sub2 %r0, %r1       // r0 = 5, #10
  subi %r0, 1         // r0 = 4, #11
  addi %r0, 4         // r0 = 8, #12

  movi %r1, 2        // r1 = 10, #13
  movi %r0, 0         // r0 = 0, #14
testlabel:
  subi %r1, 1         // r1 -= 1, #15
  ble %r0, %r1, testlabel    // loop until r1 == 0, #16

  halt                // Give back command prompt, #17
   
